using System;
using System.Collections;
using System.Xml.Serialization;


namespace PermissionBase.Core.Domain
{
    [Serializable]
    public class SystemRoleMenu
    {
        #region Field Members

        private string m_id = "";         
        private string m_role_id = "";         
        private string m_cxid = "";         
        private decimal m_jb = 0;         
        private string m_printf = "";         
        private string m_savef = "";         
        private string m_query = "";         
        private string m_excu = "";         
        private string m_comp_code = "";         
        private string m_project_code = "";         

        #endregion

        #region Property Members

        [XmlElement(ElementName = "Id")]
        public virtual string Id
        {
            get
            {
                return this.m_id;
            }
            set
            {
                this.m_id = value;
            }
        }

        [XmlElement(ElementName = "Role_id")]
        public virtual string Role_id
        {
            get
            {
                return this.m_role_id;
            }
            set
            {
                this.m_role_id = value;
            }
        }

        [XmlElement(ElementName = "Cxid")]
        public virtual string Cxid
        {
            get
            {
                return this.m_cxid;
            }
            set
            {
                this.m_cxid = value;
            }
        }

        [XmlElement(ElementName = "Jb")]
        public virtual decimal Jb
        {
            get
            {
                return this.m_jb;
            }
            set
            {
                this.m_jb = value;
            }
        }

        [XmlElement(ElementName = "Printf")]
        public virtual string Printf
        {
            get
            {
                return this.m_printf;
            }
            set
            {
                this.m_printf = value;
            }
        }

        [XmlElement(ElementName = "Savef")]
        public virtual string Savef
        {
            get
            {
                return this.m_savef;
            }
            set
            {
                this.m_savef = value;
            }
        }

        [XmlElement(ElementName = "Query")]
        public virtual string Query
        {
            get
            {
                return this.m_query;
            }
            set
            {
                this.m_query = value;
            }
        }

        [XmlElement(ElementName = "Excu")]
        public virtual string Excu
        {
            get
            {
                return this.m_excu;
            }
            set
            {
                this.m_excu = value;
            }
        }

        [XmlElement(ElementName = "Comp_code")]
        public virtual string Comp_code
        {
            get
            {
                return this.m_comp_code;
            }
            set
            {
                this.m_comp_code = value;
            }
        }

        [XmlElement(ElementName = "Project_code")]
        public virtual string Project_code
        {
            get
            {
                return this.m_project_code;
            }
            set
            {
                this.m_project_code = value;
            }
        }


        #endregion

        public override bool Equals(object o)
        {
            
            SystemRoleMenu temp = (SystemRoleMenu)o;
            if (temp.Id == this.Id && temp.Role_id == this.Role_id)
            {
                return true;
            }
            else
                return false;
        }

        public override int GetHashCode () 
        {
            return this.Role_id.GetHashCode() + this.Id.GetHashCode()+this.Cxid.GetHashCode();
            
        } 
    }
}